package edu.mapi.ir.controllers;

import edu.mapi.ir.state.EstimatedState;

/**
 * @author ZP
 */
public class SimpleReactiveController extends AbstractController {

	@Override
	public Actuation decide(Actuation lastActuation, EstimatedState state) {
		
		if(state.distanceSensors[0]>3.0 || state.distanceSensors[1]>4.0 ||  state.distanceSensors[2]>4.0) 
		    return new Actuation(0.1,-0.1);
		else if (state.distanceSensors[1] > 1.0)
			return new Actuation(0.1, 0.00);
		else if (state.distanceSensors[2] > 1.0)
			return new Actuation(0.00, 0.1);
		
		//if ()
		
		return new Actuation(0.1, 0.1);
	}
}
